3.88 \(\int \frac{1}{a+c x+b x^2} \, dx\)

Optimal. Leaf size=38 \[ \frac{2 \tan ^{-1}\left (\frac{2 b x+c}{\sqrt{4 a b-c^2}}\right )}{\sqrt{4 a b-c^2}} \]

[Out]

(2*ArcTan[(c + 2*b*x)/Sqrt[4*a*b - c^2]])/Sqrt[4*a*b - c^2]

________________________________________________________________________________________

Rubi [A]  time = 0.0340968, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {618, 204} \[ \frac{2 \tan ^{-1}\left (\frac{2 b x+c}{\sqrt{4 a b-c^2}}\right )}{\sqrt{4 a b-c^2}} \]

Antiderivative was successfully verified.

[In]

Int[(a + c*x + b*x^2)^(-1),x]

[Out]

(2*ArcTan[(c + 2*b*x)/Sqrt[4*a*b - c^2]])/Sqrt[4*a*b - c^2]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{a+c x+b x^2} \, dx &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{-4 a b+c^2-x^2} \, dx,x,c+2 b x\right )\right )\\ &=\frac{2 \tan ^{-1}\left (\frac{c+2 b x}{\sqrt{4 a b-c^2}}\right )}{\sqrt{4 a b-c^2}}\\ \end{align*}

Mathematica [A]  time = 0.0111292, size = 38, normalized size = 1. \[ \frac{2 \tan ^{-1}\left (\frac{2 b x+c}{\sqrt{4 a b-c^2}}\right )}{\sqrt{4 a b-c^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + c*x + b*x^2)^(-1),x]

[Out]

(2*ArcTan[(c + 2*b*x)/Sqrt[4*a*b - c^2]])/Sqrt[4*a*b - c^2]

________________________________________________________________________________________

Maple [A]  time = 0.223, size = 35, normalized size = 0.9 \begin{align*} 2\,{\frac{1}{\sqrt{4\,ab-{c}^{2}}}\arctan \left ({\frac{2\,bx+c}{\sqrt{4\,ab-{c}^{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*x^2+c*x+a),x)

[Out]

2*arctan((2*b*x+c)/(4*a*b-c^2)^(1/2))/(4*a*b-c^2)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.09181, size = 259, normalized size = 6.82 \begin{align*} \left [-\frac{\sqrt{-4 \, a b + c^{2}} \log \left (\frac{2 \, b^{2} x^{2} + 2 \, b c x - 2 \, a b + c^{2} - \sqrt{-4 \, a b + c^{2}}{\left (2 \, b x + c\right )}}{b x^{2} + c x + a}\right )}{4 \, a b - c^{2}}, -\frac{2 \, \arctan \left (-\frac{2 \, b x + c}{\sqrt{4 \, a b - c^{2}}}\right )}{\sqrt{4 \, a b - c^{2}}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="fricas")

[Out]

[-sqrt(-4*a*b + c^2)*log((2*b^2*x^2 + 2*b*c*x - 2*a*b + c^2 - sqrt(-4*a*b + c^2)*(2*b*x + c))/(b*x^2 + c*x + a
))/(4*a*b - c^2), -2*arctan(-(2*b*x + c)/sqrt(4*a*b - c^2))/sqrt(4*a*b - c^2)]

________________________________________________________________________________________

Sympy [B]  time = 0.290812, size = 124, normalized size = 3.26 \begin{align*} - \sqrt{- \frac{1}{4 a b - c^{2}}} \log{\left (x + \frac{- 4 a b \sqrt{- \frac{1}{4 a b - c^{2}}} + c^{2} \sqrt{- \frac{1}{4 a b - c^{2}}} + c}{2 b} \right )} + \sqrt{- \frac{1}{4 a b - c^{2}}} \log{\left (x + \frac{4 a b \sqrt{- \frac{1}{4 a b - c^{2}}} - c^{2} \sqrt{- \frac{1}{4 a b - c^{2}}} + c}{2 b} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x**2+c*x+a),x)

[Out]

-sqrt(-1/(4*a*b - c**2))*log(x + (-4*a*b*sqrt(-1/(4*a*b - c**2)) + c**2*sqrt(-1/(4*a*b - c**2)) + c)/(2*b)) +
sqrt(-1/(4*a*b - c**2))*log(x + (4*a*b*sqrt(-1/(4*a*b - c**2)) - c**2*sqrt(-1/(4*a*b - c**2)) + c)/(2*b))

________________________________________________________________________________________

Giac [A]  time = 1.18351, size = 46, normalized size = 1.21 \begin{align*} \frac{2 \, \arctan \left (\frac{2 \, b x + c}{\sqrt{4 \, a b - c^{2}}}\right )}{\sqrt{4 \, a b - c^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x^2+c*x+a),x, algorithm="giac")

[Out]

2*arctan((2*b*x + c)/sqrt(4*a*b - c^2))/sqrt(4*a*b - c^2)